lists = ["周杰伦", "周星驰", "发哥"]
# 遍历列表操作姿势一
for listValue in lists:
    print(listValue)
# 遍历列表操作姿势二
for V in range(0, len(lists), 1):
    print(lists[V])
# 遍历列表操作姿势三
flag = True
offset = 0
while flag:
    print(lists[offset] + str(offset))
    if offset == len(lists) - 1:
        flag = False
        break
    else:
        offset = offset + 1
# 求数组序列的最大最小值 和总和
mathList = []
for V in range(1, 50, 2):
    mathList.append(V)
print(min(mathList))
print(max(mathList))
print(sum(mathList))
# 列表解析
squares = [V ** 2 for V in range(1, 11111)]  # 从1开始 计算到11110的数字的平方形成一个列表
print(squares)

players = ["张三", "李四", "王五"]
print(players[0:2])  # 提取列表中第1——2个元素
print(players[:2])
print(players[0:1])
print(players[2:])
print(players[-1:])  # 提取列表中的倒数第一个

# 列表的复制
players_copy_true = players[:]
players_copy_false = players
players_copy_true.append("players_copy_true")
players_copy_false.append("players_copy_false")
print(players)
print(players_copy_true)
print(players_copy_false)

# 元祖 创建一系列不可以修改的元素
dimensions = (200, 50)
print(dimensions[0])
print(dimensions[1])
# 给存储元祖的变量赋值
dimensions = (100, 50, 20)
print(dimensions[0])
print(dimensions[2])
